package org.learn;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @Auther: qingle
 * @Date: 2024/9/9-1:15
 * @Description: jdk提供的便捷的创建线程的方式
 * 阿里巴巴开发文档不建议使用这些方式创建线程池，而是使用原生的ThreadPoolExecutor
 *
 * @version: 1.0
 */
public class PoolTest05 {

	public static void main(String[] args) throws InterruptedException {
		ExecutorService executorService = Executors.newFixedThreadPool(5);
		ExecutorService executorService1 = Executors.newCachedThreadPool();
		ExecutorService executorService2 = Executors.newSingleThreadExecutor();
		ExecutorService executorService3 = Executors.newScheduledThreadPool(5);

	}
}
